/*
 * @Description: App首页通知API
 * @Version: 2.0
 * @Autor: 许国辉
 * @Date: 2022-12-03 09:20:53
 * @LastEditors: 许国辉
 * @LastEditTime: 2023-10-21 20:12:10
 */
import { AppNotificationModel } from '../model/appSetting/appNotificationModel';
import { defHttp } from '/@/utils/http/axios';
enum Api {
  getAppNotificationByID = '/app/appNotification/getAppNotification',
  updateAppNotification = '/app/appNotification/updateAppNotification',
  oaLogin = '/pub/oaLogin',
  oaLoginPW = '/pub/oaLoginPW',
  oaLoginNew = '/pub/oaLoginNew',
}

export function oaLoginPW() {
  return defHttp.post<any>({
    url: Api.oaLoginPW,
    headers: {
      ignoreCancelToken: true,
    },
  });
}

export function oaLoginNew(params: any) {
  return defHttp.post<any>({
    url: Api.oaLoginNew,
    params,
    headers: {
      ignoreCancelToken: true,
    },
  });
}

export function oaLogin() {
  return defHttp.post<string>({
    url: Api.oaLogin,
    headers: {
      ignoreCancelToken: true,
    },
  });
}

export function getAppNotificationModelByID() {
  return defHttp.post<AppNotificationModel>({
    url: Api.getAppNotificationByID,
    headers: {
      ignoreCancelToken: true,
    },
  });
}

export function updateAppNotificationModel(params: AppNotificationModel) {
  return defHttp.post<AppNotificationModel>({
    url: Api.updateAppNotification,
    params,
    headers: {
      ignoreCancelToken: true,
    },
  });
}
